<%@page import="com.kucun.bean.Users"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
response.setHeader("Pragma","No-cache"); 
response.setHeader("Cache-Control","no-cache"); 
response.setDateHeader("Expires", 0); 
Users user= (Users)request.getSession().getAttribute("user");
response.flushBuffer();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../css/index.css">
<link rel="stylesheet" type="text/css" href="../jquery-easyui-1.4.5/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../jquery-easyui-1.4.5/themes/icon.css">
<link rel="stylesheet" type="text/css" href="../jquery-easyui-1.4.5/themes/color.css">
<script type="text/javascript" src="../jquery-easyui-1.4.5/jquery.min.js"></script>
<script type="text/javascript" src="../jquery-easyui-1.4.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../js/goods.js"></script>
<link rel="stylesheet" type="text/css" href="../css/index.css">
<title>物品</title>
<script type="text/javascript">
   var path="<%=basePath%>";
   var role="<%=user.getPower()%>";  

</script>
</head>
<body class="easyui-layout">
<div data-options="region:'north',border:false" style="height:50px;background-color: #F2F5F7;">
<div id="searth" style="font-size: 12px;">
搜索字段：<input class="easyui-searchbox" style="width:300px" data-options="menu:'#mm',
prompt:'请选择字段后再输入',height:30,searcher:function(value,name){searcherGoods(value,name)}" />
<div id="mm" style="width:150px">
	<div data-options="name:'goodsname',selected:true">物品名称</div>
	<div data-options="name:'specifications'">规格型号</div>
	<div data-options="name:'billno'">物品编码</div>
	<div data-options="name:'units'">单位</div>
	<div data-options="name:'isused'">是否启用</div>
</div>
</div>
</div> 
<div region="center"  split="true"   title="物品信息" style="overflow: hidden;">
<table id="goods"></table>
</div>

<div id="goodsadd" class="easyui-dialog" style="width:300px;height:300px;closed:true" data-options="title:'物品信息',modal:true,closed:true,buttons:[{text:'确定', handler:function(){add(this)} },{text:'关闭', handler:function(){$('#goods').datagrid('reload');$('#goodsadd').window('close')} }]">
	<form id="addgoodsform" name="addgoodsform" method="post">   
	<table style="line-height: 30px;">
	<input type="hidden" id="tag" name="tag"/>
	<input type="hidden" id="id" name="id"/>
	  <!--  <tr>
	     <td>物品编码：</td>
	     <td><input class="easyui-validatebox" type="text" name="billno" data-options="required:true" />   </td>
	   </tr> -->
	  <tr>
	     <td>物品名称：</td>
	     <td><input class="easyui-validatebox" type="text" id="goodsname" name="goodsname" data-options="required:true" /> </td>
	   </tr>
	   <tr>
	     <td>规格型号：</td>
	     <td><input class="easyui-validatebox" type="text" id="specifications" name="specifications" data-options="required:true" />    
	     	<%-- <input id="specifications" class="easyui-combobox" name="specifications" data-options="required:true,valueField:'id',textField:'name',url:'<%=basePath%>guige/getallguigenopaging.html',
	     onSelect:function(objs)
		    {
		    	$('#specifications').combobox('setValue',objs.name);
		    }"  /> --%>
	     
	     </td>
	  
	   </tr>
	   <tr>
	     <td>单位：</td>
	     <td> 
	     <input id="units" class="easyui-combobox" name="units" data-options="required:true,valueField:'id',textField:'unit',url:'<%=basePath%>units/getallunitsnopaging.html',
	     onSelect:function(objs)
		    {
		    	$('#units').combobox('setValue',objs.unit);
		    }"  /> 
  
		     </td>
	   </tr> 
	  <tr>
	     <td>是否启用：</td>
	     <td>
	     <select id="isused"  name="isused" style="width:150px;">   
		    <option value="1">启用</option>   
		    <option value="0">停用</option>    
		</select>
	     </td>
	   </tr>
	</table>    
</form>  
</div>

</body>
</html>